package com.trafficradio.trafficradio.util;

import android.content.Context;
import android.os.Handler;
import android.os.Message;
import android.widget.Toast;

/**
 * Created by jwzxg on 2016/7/8.
 */
public class MyHandler extends Handler {
    Context context;

    public MyHandler(Context context){
        this.context = context;
    }
    @Override
    public void handleMessage(Message msg){
        switch (msg.what){
            case CONSTANT.LOADTEXT:

                Data.text = msg.obj.toString().split("/");
                Toast.makeText(this.context,Data.text[0],Toast.LENGTH_SHORT).show();
                break;
            case CONSTANT.UPDATEIMAGE:
                Toast.makeText(this.context,msg.obj.toString(),Toast.LENGTH_LONG).show();
                break;

        }




    }
}
